package com.gitee.mall.sentinel.sentinel;

import com.alibaba.csp.sentinel.slots.block.BlockException;
import com.gitee.common.utils.R;

public class CommonBlockHandler {

    public static R blockHandler(Integer id, BlockException blockException) {

        return R.error(-1, "被限流啦" + blockException);
    }

    public static R fallBack(Integer id, Exception e) {

        return R.error(-1, "代码业务异常" + e);
    }
}
